/**
 * 
 */
package com.nannytools.commonObjects;

/**
 * @author alex
 *
 */
public class Taxes {
	private Double taxRate;
	private String taxType;
	private String taxName;
	private String taxAmount;
	/**
	 * @return the taxRate
	 */
	public synchronized Double getTaxRate() {
		return taxRate;
	}
	/**
	 * @param taxRate the taxRate to set
	 */
	public synchronized void setTaxRate(Double taxRate) {
		this.taxRate = taxRate;
	}
	/**
	 * @return the taxType
	 */
	public synchronized String getTaxType() {
		return taxType;
	}
	/**
	 * @param taxType the taxType to set
	 */
	public synchronized void setTaxType(String taxType) {
		this.taxType = taxType;
	}
	/**
	 * @return the taxName
	 */
	public synchronized String getTaxName() {
		return taxName;
	}
	/**
	 * @param taxName the taxName to set
	 */
	public synchronized void setTaxName(String taxName) {
		this.taxName = taxName;
	}
	/**
	 * @return the taxAmount
	 */
	public synchronized String getTaxAmount() {
		return taxAmount;
	}
	/**
	 * @param taxAmount the taxAmount to set
	 */
	public synchronized void setTaxAmount(String taxAmount) {
		this.taxAmount = taxAmount;
	}
	
	/**
	 * Structure of the tax object
	 * TAX ARRAY:
	 * taxRate
	 * taxType
	 * taxName
	 * taxAmount
	 * @return
	 */
	
	public Object[] convertToArray () {
		Object[] taxArray = new Object[4];
		
		taxArray[0] = this.taxRate;
		taxArray[1] = this.taxType;
		taxArray[2] = this.taxName;
	    taxArray[3] = this.taxAmount;
		return taxArray;
	}
	
	public String toString() {
		String taxToString = "";
		Object[] taxArray = convertToArray();
		
		for(Object taxIter : taxArray) {
			taxToString = taxIter.toString();
		}
		return taxToString;
	}
	
}
